<style>
    #allotmentCapital-add {
        padding: 20px 25px 25px 0;
    }
</style>
<div class="layui-fluid" id="allotmentCapital-add">
    <form class="layui-form" lay-filter="allotmentCapital-add-form">
        <div class="layui-form-item ">
            <div class="layui-row">
                <div class="layui-col-md12">
                    <label class="layui-form-label website-form-item-require">课题：</label>
                    <div class="layui-input-block">
                        <select name="declareId" lay-search lay-verify="required">
                            <option value="">请选择</option>
                            <option
                                    th:each="item : ${declareTopicList}"
                                    th:value="${item.declareId}" th:text="${item.name}">
                            </option>
                        </select>
                    </div>
                </div>

            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label website-form-item-require">主持人：</label>
                    <div class="layui-input-block">
                        <input type="text" name="hostPeople" lay-verify="required" maxlength="10" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-col-md6">
                   <label class="layui-form-label website-form-item-require">拨付时间：</label>
                   <div class="layui-input-block">
                       <input type="text" name="allotmentTime"  lay-verify="required" class="layui-input" id="allotmentTime" placeholder="yyyy-MM-dd">
                   </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label website-form-item-require">拨付金额(万元)：</label>
                    <div class="layui-input-block">
                        <input type="text" name="allotmentMoney" lay-verify="required|money" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-col-md6">
                    <label class="layui-form-label website-form-item-require">本次累计拨付金额(万元)：</label>
                    <div class="layui-input-block">
                        <input type="text" name="cumulativeMoney" lay-verify="required|money" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-row">
                <div class="layui-col-md6">
                    <label class="layui-form-label website-form-item-require">总金额(万元)：</label>
                    <div class="layui-input-block">
                        <input type="text" name="totalMoney" lay-verify="required|money" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item website-hide">
            <button class="layui-btn" lay-submit="" lay-filter="allotmentCapital-add-form-submit" id="submit"></button>
            <button type="reset" class="layui-btn" id="reset"></button>
        </div>
    </form>
</div>

<script>
    layui.use(['website', 'form', 'validate', 'laydate'], function () {
        var $ = layui.$,
            website = layui.website,
            laydate = layui.laydate,
            layer = layui.layer,
            form = layui.form,
            $view = $('#allotmentCapital-add'),
            validate = layui.validate;

        form.verify(validate);
        form.render();
        laydate.render({
            elem: '#allotmentTime',
            trigger: 'click'
        });
        form.on('submit(allotmentCapital-add-form-submit)', function (data) {
            website.post(ctx + 'allotmentCapital', data.field, function () {
                layer.closeAll();
                website.alert.success('新增成功');
                $('#website-allotmentCapital').find('#query').click();
            });
            return false;
        });
    });
</script>